export default [
  {path: '/', name: '主页', icon: 'book', component: './Welcome'},
  {
    path: '/user',
    layout: false,
    routes: [
      {name: '登录', path: '/user/login', component: './User/Login'},
      {name: '注册', path: '/user/register', component: './User/Register' },
    ],
  },
  {
    path: '/user',
    name: '个人页', icon: 'smile',
    routes: [
      {name: '个人信息', path: '/user/info', component: './User/Info'},
      {name: '借阅信息', path: '/user/my-borrow', component: './User/MyBorrowRecord'},
    ],
  },
  {
    path: '/admin',
    name: '管理页',
    icon: 'crown',
    access: 'canAdmin',
    routes: [
      // {name: '接口管理', icon: 'table', path: '/admin/interface_info', component: './Admin/InterfaceInfo'},
      // {name: '接口分析', icon: 'analysis', path: '/admin/interface_analysis', component: './Admin/InterfaceAnalysis'},
      {path: '/admin/user-manage', name: '用户管理', icon: 'smile', component: './Admin/UserManage' },
      {path: '/admin/book-manage', name: '图书管理', icon: 'smile', component: './Admin/BookManage' },
      {path: '/admin/borrow-record-manage', name: '借阅管理', icon: 'smile', component: './Admin/BorrowRecordManage' },
      {path: '/admin/category-manage', name: '分类管理', icon: 'smile', component: './Admin/CategoryManage' },
      {path: '/admin/analysis', name: '统计分析', icon: 'smile', component: './Admin/Analysis' },
    ],
  },

  // { path: '/', redirect: '/welcome' },
  {path: '*', layout: false, component: './404'},
];
